home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 28
/
Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso
/
Aminet
/
hard
/
drivr
/
BetaScan_1.12.lha
/
BetaScan
/
ScannerDev
/
Scanner.h
< prev
next >
Wrap
C/C++ Source or Header
|
1998-10-04
|
4KB
|
139 lines
#ifndef SCANNER_H
#define SCANNER_H
#include <exec/types.h>
#include <exec/io.h>
// Non standard command for the scanner
#define SCANCMD_SET CMD_NONSTD
// Color numbers
#define COLORNUM_HALFTONE (0x01<<0)
#define COLORNUM_BW (0x01<<1)
#define COLORNUM_GREY8 (0x01<<8)
#define COLORNUM_RGB24 (0x01<<24)
// Status codes
#define SCAN_STATUS_OK 0
#define SCAN_STATUS_EOF 1
#define SCAN_ERR_NOTSCANNING 10
#define SCAN_ERR_DEVICEOPEN 11
#define SCAN_ERR_MEMORY 12
#define SCAN_ERR_READY 13
#define SCAN_ERR_PARAMETER 14
#define SCAN_ERR_HARDWARE 15
#define SCAN_ERR_COMMUNICATION 16
#define SCAN_ERR_MISC 17
struct ScannerOptions
{
char so_vendor[40];
char so_model[40];
UBYTE so_version;
UBYTE so_revision;
ULONG so_colorMode; /* bit set = supported colornum */
/* bit 0 = halftone */
UWORD so_opticResolution; /* Maximum optical resolution */
UWORD so_opticResStep;
UWORD so_interResolution; /* Maximum interpolated resolut */
UWORD so_interResStep;
WORD so_brightnessMin; /* Percent of maximum light to add */
WORD so_brightnessMax;
WORD so_brightnessStep;
WORD so_brightnessDefault;
WORD so_contrastMin; /* Percent */
WORD so_contrastMax;
WORD so_contrastStep;
WORD so_contrastDefault;
WORD so_shadowMin;
WORD so_shadowMax;
WORD so_shadowStep;
WORD so_shadowDefault;
WORD so_highlightMin;
WORD so_highlightMax;
WORD so_highlightStep;
WORD so_highlightDefault;
WORD so_midtoneMin;
WORD so_midtoneMax;
WORD so_midtoneStep;
WORD so_midtoneDefault;
WORD so_exposureTimeMin;
WORD so_exposureTimeMax;
WORD so_exposureTimeStep;
WORD so_exposureTimeDefault;
WORD so_velocityMin;
WORD so_velocityMax;
WORD so_velocityStep;
WORD so_velocityDefault;
WORD so_halftonePatternMin;
WORD so_halftonePatternMax;
WORD so_halftonePatternStep;
WORD so_halftonePatternDefault;
WORD so_maxLookupTableSize;
ULONG so_flags;
double so_docWidth; /* Paper size in mm */
double so_docLength;
};
/*
* Option flags
*
*/
#define FORCE_3PASS (1<<0)
struct ScanParameters
{
ULONG sp_ColorNum; /* 0: halftone, >0: number of colors */
double sp_x0; /* Scanning frame in mm */
double sp_y0;
double sp_x1;
double sp_y1;
UWORD sp_xResolution; /* Horizontal resolution */
UWORD sp_yResolution; /* Vertical resolution */
WORD sp_brightness[3]; /* Brightness for red, green and blue */
WORD sp_contrast; /* Contrast */
WORD sp_shadow; /* shadow adjust */
WORD sp_highlight; /* highlight adjust */
WORD sp_midtone; /* midtone adjust */
WORD sp_halftonePattern; /* halftomePattern */
WORD sp_exposureTime; /* Exposure time */
double sp_gamma; /* gamma value */
ULONG sp_flags;
};
/*
* Flags
*
*/
#define REVERSE_COLOR (1<<0)
#define NO_CALIBRATE (1<<1)
#define NO_BACKTRACK (1<<2)
#define EXTENDED_RES (1<<3)
#define DO_3PASS (1<<4)
struct ScanInformation
{
UWORD sv_imageWidth; /* image width in pixels */
UWORD sv_imageHeight; /* image height in pixels */
UWORD sv_bytesPerLine; /* bytes per line read (excl. color) */
UWORD sv_Flags; /* data information flags */
UWORD sv_xResolution; /* actual horizontal resolution */
UWORD sv_yResolution; /* actual vertical resolution */
};
#endif /* SCANNER_H */